package net.zjitc.controller;

import net.zjitc.pojo.User;
import net.zjitc.service.UserService;
import net.zjitc.service.impl.UserServiceImpl;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


import java.util.List;

/**
 * @Author admin
 * @Date 2019/4/30 10:39
 */
@Controller
public class UserController {
    UserService userService=new UserServiceImpl();
    @RequestMapping("/findAll")
    public String findAll(Model model){
        List<User> list = userService.findAll();
        model.addAttribute("list",list);
        return "list.jsp";

    }
}
